package com.gzy.cbrsystem.insomnia.util;

import com.gzy.cbrsystem.insomnia.InsomniaBasicInfo;
import com.gzy.cbrsystem.insomnia.InsomniaBasicInfoDAO;
import com.gzy.cbrsystem.insomnia.InsomniaChanges;
import com.gzy.cbrsystem.insomnia.InsomniaChangesDAO;
import com.gzy.cbrsystem.insomnia.InsomniaClinical;
import com.gzy.cbrsystem.insomnia.InsomniaClinicalDAO;

import com.gzy.cbrsystem.insomnia.InsomniaDiagnosis;
import com.gzy.cbrsystem.insomnia.InsomniaDiagnosisDAO;

import com.gzy.cbrsystem.insomnia.InsomniaTreatment;
import com.gzy.cbrsystem.insomnia.InsomniaTreatmentDAO;

public class InsomniaDAO {
	private String caseId;
	protected InsomniaBasicInfoDAO insomniaBasicInfoDAO;
	protected InsomniaChangesDAO insomniaChangesDAO;
	protected InsomniaClinicalDAO insomniaClinicalDAO;
	protected InsomniaDiagnosisDAO insomniaDiagnosisDAO;
	protected InsomniaTreatmentDAO insomniaTreatmentDAO;
	
	public String getCaseId() {
		return caseId;
	}

	public void setCaseId(String caseId) {
		this.caseId = caseId;
	}

	public InsomniaBasicInfoDAO getInsomniaBasicInfoDAO() {
		return insomniaBasicInfoDAO;
	}

	public void setInsomniaBasicInfoDAO(InsomniaBasicInfoDAO insomniaBasicInfoDAO) {
		this.insomniaBasicInfoDAO = insomniaBasicInfoDAO;
	}

	public InsomniaChangesDAO getInsomniaChangesDAO() {
		return insomniaChangesDAO;
	}

	public void setInsomiaChangesDAO(InsomniaChangesDAO insomniaChangesDAO) {
		this.insomniaChangesDAO = insomniaChangesDAO;
	}

	public InsomniaClinicalDAO getInsomniaClinicalDAO() {
		return insomniaClinicalDAO;
	}

	public void setInsomniaClinicalDAO(InsomniaClinicalDAO insomnicaClinialDAO) {
		this.insomniaClinicalDAO = insomnicaClinialDAO;
	}

	public InsomniaDiagnosisDAO getInsomniaDiagnosisDAO() {
		return insomniaDiagnosisDAO;
	}

	public void setInsomniaDiagnosisDAO(InsomniaDiagnosisDAO insomniaDiagnosisDAO) {
		this.insomniaDiagnosisDAO = insomniaDiagnosisDAO;
	}

	public InsomniaTreatmentDAO getInsomniaTreatmentDAO() {
		return insomniaTreatmentDAO;
	}

	public void setInsomniaTreatmentDAO(InsomniaTreatmentDAO insomniaTreatmentDAO) {
		this.insomniaTreatmentDAO = insomniaTreatmentDAO;
	}

	public Insomnia findByCaseId(String caseId)
	{
		Insomnia insomnia=new Insomnia();
		insomnia.setCaseId(caseId);
		insomnia.setInsomniaBasicInfo(this.getInsomniaBasicInfoDAO().findById(caseId));
		insomnia.setInsomniaDiagnosis(this.getInsomniaDiagnosisDAO().findById(caseId));
		insomnia.setInsomniaClinical(this.insomniaClinicalDAO.findById(caseId));
		insomnia.setInsomniaChanges(this.getInsomniaChangesDAO().findById(caseId));
		insomnia.setInsomniaTreatment(this.insomniaTreatmentDAO.findById(caseId));
		
		return insomnia;
	}
	
}
